package io.github.hellomaker.domain.strategy.adapter.repository;

import io.github.hellomaker.domain.strategy.model.entity.StrategyAwardEntity;
import io.github.hellomaker.domain.strategy.model.entity.StrategyEntity;
import io.github.hellomaker.domain.strategy.model.entity.StrategyRuleEntity;

import java.util.List;
import java.util.Map;

/**
 * @author hellomaker
 * 策略服务仓储接口
 *
 */
public interface IStrategyRepository {

    List<StrategyAwardEntity> queryStrategyAwardList(Long strategyId);

    StrategyRuleEntity queryStrategyRuleEntity(Long strategyId, String ruleModel);

    StrategyEntity queryStrategyEntity(Long strategyId);

    void storeStrategyAwardSearchRateTable(String key, Integer rateRange, Map<Integer, Integer> strategyAwardSearchRateTable);

    Integer getStrategyAwardAssemble(Long strategyId, Integer rateKey);

    Integer getStrategyAwardAssemble(Long strategyId, Integer ruleWeight, Integer rateKey);

    int getRateRange(Long strategyId);

    int getRateRange(Long strategyId, Integer ruleWeight);


}
